function v = bvqxtools_version
% bvqxtools_version  - return the version of the BVQXtools installation
%
% FORMAT:       v = bvqxtools_version
%
% No input fields.
%
% Output fields:
%
%       v           version number (in this case 0.8b)

% Version:  v0.8b
% Build:    9112302
% Date:     Nov-23 2009, 2:42 AM CET
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% no argument check necessary

% get version
v = regexprep(grep(which('BVQXtools'), 'Version'), ...
    '^.*Version\:\s*v(\d+\.\d+.*)\s*$', '$1');
if iscell(v)
    v = v{1};
end
